<template>
    <div class="subpage">
        <div style="flex:1;background-color: #f5f5f5;height:100vh;display: flex;justify-content: center;align-items: center;"
            v-if="!hasdata">
            <div style="font-size: 14px;color: #999999;">暂无数据</div>
        </div>
        <div v-else>
            <h2>全部</h2>
            <order-list-cell data="{}"></order-list-cell>
            <order-list-cell :data="item" v-for="(item,idx) in list" :key="idx"></order-list-cell>
        </div>
    </div>
</template>

<script>
    import {
        orderList
    } from "../../api/workbench.js"
    export default {
        name: "order-list-all",
        data() {
            return {
                pageNum: 1,
                pageSize: 30,
                list: []
            };
        },
        mounted() {
            this.netOrderList()
        },
        methods: {
            netOrderList() {
                let fi = {
                    pageNum: this.pageNum,
                    pageSize: this.pageSize
                };
                let self = this;
                orderList(fi).then(res => {
                    let {
                        data
                    } = res;
                    let {
                        record
                    } = data;
                    self.list = record;
                    console.warn(JSON.stringify(res))
                }).catch(e => {
                    console.error(e)
                })
            }

        }
    }
</script>

<style scoped>
    .subpage {}
</style>